<template>
	<view class="container">
		<view class="config">
			<icon class="iconfont icon-saoma"></icon>
			<icon class="iconfont icon-shezhi"></icon>
		</view>
		<view class="user-info">
			<view class="left">
				<image src="@/static/images/avatar2.jpg" mode=""></image>
			</view>
			<view class="center">
				<text>
					赵半仙儿
					<van-icon name="play" />
				</text>
				<view class="info">
					<van-icon name="coupon-o" />
					<text>职场名片</text>
					<view></view>
					<text>影响力 4</text>
				</view>
			</view>
			<view class="right">
				<van-icon name="replay" />
				<text>刷新简历</text>
			</view>
		</view>
		<van-grid class="count" :border="false">
			<van-grid-item v-for="item in countList" :key="item.id">
				<text>{{ item.count }}</text>
				<text>{{ item.name }}</text>
			</van-grid-item>
		</van-grid>
		<view class="post-info">
			<view v-for="item in infoList" :key="item.id">
				<icon :class="['iconfont', item.icon]"></icon>
				<text>{{ item.title }}</text>
				<text>{{ item.text }}</text>
			</view>
		</view>
		<view class="serve">
			<view class="title">
				<text>求职服务</text>
				<text>
					全部
					<van-icon name="play" />
				</text>
			</view>
			<view class="resume-info">
				<view class="resume-item" v-for="item in CVList" :key="item.id">
					<icon :class="['iconfont', item.icon]"></icon>
					<text>{{ item.title }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';

const countList = ref([
	{ id: 1, name: '投递', count: 15 },
	{ id: 2, name: '收藏', count: 2 },
	{ id: 3, name: '面试', count: 5 },
	{ id: 4, name: '足迹', count: 88 }
]);
const infoList = ref([
	{ id: 1, icon: 'icon-_jianli', title: '在线简历', text: '可刷新简历' },
	{ id: 2, icon: 'icon-fujianjianli', title: '附件简历', text: '已上传1份' },
	{ id: 3, icon: 'icon-wodeqiuzhiyixiang', title: '求职意向', text: '在职-找工作' },
	{ id: 4, icon: 'icon-jiatingzhuzhi', title: '我的住址', text: '去修改' }
]);
const CVList = ref([
	{ id: 1, icon: 'icon-yaoqingmianshi', title: '保面试' },
	{ id: 2, icon: 'icon-jianliyouhua', title: '简历优化' },
	{ id: 3, icon: 'icon-zhiding', title: '简历置顶' },
	{ id: 4, icon: 'icon-xiaoxitixing', title: '优先提醒' }
]);
</script>

<style lang="scss" scoped>
.container {
	height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 0 10px;
	background: linear-gradient(to bottom, #fff990, #fff992, #fff992, #f7f8fa, #f7f8fa, #f7f8fa, #f7f8fa, #f7f8fa, #f7f8fa);
}
.config {
	width: 95%;
	display: flex;
	justify-content: flex-end;
	padding: 30px 10px 15px 10px;
	gap: 10px;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9;
	.iconfont {
		font-size: 20px;
		color: $base-color;
	}
}
.user-info {
	margin-top: 56px;
	display: flex;
	align-items: center;
	width: 100%;
	.left {
		image {
			width: 40px;
			height: 40px;
			border-radius: 50%;
		}
	}
	.center {
		flex: 1;
		padding-left: 10px;
		display: flex;
		flex-direction: column;
		text {
			color: $base-color;
			font-size: $base-size;
		}
		.info {
			display: flex;
			align-items: center;
			margin-top: 5px;
			.van-icon {
				color: $grey-color;
				font-size: $min-size;
				margin-right: 2px;
			}
			view {
				width: 1px;
				height: 10px;
				background-color: #d9dbe1;
				margin: 0 5px;
			}
			text {
				color: $grey-color;
				font-size: $min-size;
			}
		}
	}
	.right {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		color: #fff;
		padding: 5px 10px;
		background-color: #ffc824;
		border-radius: 50px;
		font-size: $min-size;
	}
}
.count {
	.van-grid-item {
		font-size: $max-size;
		color: $base-color;
		text {
			margin-bottom: 5px;
			&:nth-child(2) {
				margin-bottom: 0;
				font-size: $min-size;
			}
		}
		:deep(.van-grid-item__content) {
			background: unset;
		}
	}
}
.post-info {
	border-radius: 8px;
	display: flex;
	justify-content: space-between;
	background-color: #fff;
	padding: 16px 10px;
	view {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		.iconfont {
			font-size: 24px;
			color: #fe9a57;
			margin-bottom: 5px;
		}
		text {
			&:nth-child(2) {
				font-size: 11px;
				margin-bottom: 3px;
			}
			&:nth-child(3) {
				font-size: 10px;
				color: $grey-color;
			}
		}
	}
}
.serve {
	margin-top: 15px;
	border-radius: 8px;
	background-color: #fff;
	padding: 16px 10px;
	.title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text {
			font-size: $max-size;
			font-weight: 600;
			&:nth-child(2) {
				font-size: $min-size;
				color: $grey-color;
				font-weight: normal;
				.van-icon {
					color: $grey-color;
				}
			}
		}
	}
	.resume-info {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 15px;
		.resume-item{
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			gap:3px;
			.iconfont{
				font-size: 26px;
				color:#FFD712;
			}
			text{
				font-size: $min-size;
				color:$base-color;
			}
		}
	}
}
</style>
